#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
using namespace std;
typedef struct BiNode {
    char data;
    struct BiNode* lchild, * rchild;
}BiTNode, * BiTree;

void CreateBiTree(BiTree& T) {
    char ch;
    cin >> ch;
    if (ch == '#')  T = NULL;
    else {
        T = new BiTNode;
        T->data = ch;
        CreateBiTree(T->lchild);
        CreateBiTree(T->rchild);
    }
}

int NodeCount(BiTree T)
{
    if () return 0;
    if (T->lchild == NULL && T->rchild != NULL)
        return;
    if (T->lchild != NULL && T->rchild == NULL)
        return;
    ;
}

int main() {
    BiTree T;
    CreateBiTree(T);
    printf("%d", NodeCount(T));
    return 0;
}